package com.itheima.tlias.web.controller;

import com.itheima.tlias.domain.Emp;
import com.itheima.tlias.service.EmpService;
import com.itheima.tlias.vo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ghy
 * @version 1.0.1
 * @date 2024-01-30 09:04:44
 */
@RestController
@Slf4j
public class LoginController {

    @Autowired
    private EmpService empService;

    @PostMapping("/login")
    public Result login(@RequestBody Emp emp){
        log.info("login:{}", emp);
        return empService.login(emp);
    }

}
